CREATE TABLE [dbo].[UserUsers_RoleRoles]
(
[Roles] [uniqueidentifier] NULL,
[Users] [uniqueidentifier] NULL,
[OID] [uniqueidentifier] NOT NULL ROWGUIDCOL,
[OptimisticLockField] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[UserUsers_RoleRoles] ADD CONSTRAINT [PK_UserUsers_RoleRoles] PRIMARY KEY CLUSTERED  ([OID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iRoles_UserUsers_RoleRoles] ON [dbo].[UserUsers_RoleRoles] ([Roles]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [iRolesUsers_UserUsers_RoleRoles] ON [dbo].[UserUsers_RoleRoles] ([Roles], [Users]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [iUsers_UserUsers_RoleRoles] ON [dbo].[UserUsers_RoleRoles] ([Users]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[UserUsers_RoleRoles] WITH NOCHECK ADD CONSTRAINT [FK_UserUsers_RoleRoles_Roles] FOREIGN KEY ([Roles]) REFERENCES [dbo].[Role] ([Oid]) NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[UserUsers_RoleRoles] WITH NOCHECK ADD CONSTRAINT [FK_UserUsers_RoleRoles_Users] FOREIGN KEY ([Users]) REFERENCES [dbo].[User] ([Oid]) NOT FOR REPLICATION
GO
